import 'package:oramemo/generated/json/base/json_convert_content.dart';
import 'package:oramemo/entity/requst/custom_model_post_entity.dart';

CustomModelPostEntity $CustomModelPostEntityFromJson(
    Map<String, dynamic> json) {
  final CustomModelPostEntity customModelPostEntity = CustomModelPostEntity();
  final String? modelConfig = jsonConvert.convert<String>(json['modelConfig']);
  if (modelConfig != null) {
    customModelPostEntity.modelConfig = modelConfig;
  }
  final String? deviceId = jsonConvert.convert<String>(json['deviceId']);
  if (deviceId != null) {
    customModelPostEntity.deviceId = deviceId;
  }
  final String? modelName = jsonConvert.convert<String>(json['modelName']);
  if (modelName != null) {
    customModelPostEntity.modelName = modelName;
  }
  return customModelPostEntity;
}

Map<String, dynamic> $CustomModelPostEntityToJson(
    CustomModelPostEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['modelConfig'] = entity.modelConfig;
  data['deviceId'] = entity.deviceId;
  data['modelName'] = entity.modelName;
  return data;
}

extension CustomModelPostEntityExtension on CustomModelPostEntity {
  CustomModelPostEntity copyWith({
    String? modelConfig,
    String? deviceId,
    String? modelName,
  }) {
    return CustomModelPostEntity()
      ..modelConfig = modelConfig ?? this.modelConfig
      ..deviceId = deviceId ?? this.deviceId
      ..modelName = modelName ?? this.modelName;
  }
}